iff %@removable[%@instr[0,2,%Targetpath]] eq 1 .and. "%Sfx" eq "Y" then^# 16 48 bla on bri red No^set Volumes=N^unset /q Jump^goto Line8A^endiff
iff %@removable[%@instr[0,2,%Targetpath]] ne 1 then^# 16 48 bla on bri red No^set Volumes=N^unset /q Jump^goto Line8A^endiff
# 16 48 bla on bri red N^screen 16 48^set Jump=Y^inkey /c %%Volumes^check %Volumes
iff "%Volumes" eq "@72" then^# 16 48 bla on bri red ` `^# 15 48 bla on bri red ` `^unset /q Jump^goto Line6A^elseiff "%Volumes" eq "@80" then^set Volumes=N^endiff
iff "%Volumes" eq "@28" .or. "%Volumes" eq "N" then^set Volumes=N^# 16 48 bla on bri red No^goto Line8A^endiff
iff "%Volumes" eq "Y" then^# 16 48 bla on bri red Yes^goto Line8A^elseiff "%Volumes" eq "@59" then
set Line1=`This option is to create & split an archive into multiple `^set Line2=`floppy-disks(for backup purposes) Hit a key to continue ...`
# 17 48 bla on bri red N^screen 17 48^inkey /c %%Store^check %Store
iff "%Store" eq "@72" .and. "%Jump" eq "Y" then^# 17 48 bla on bri red ` `^# 16 48 bla on bri red ` `^goto Line7A
elseiff "%Store" eq "@72" .and. "%Jump" eq "" then^# 17 48 bla on bri red ` `^# 16 48 bla on bri red ` `
# 15 48 bla on bri red ` `^goto Line6A^endiff^iff "%Store" eq "@28" .or. "%Store" eq "N" .or. "%Store" eq "@80" then^set Store=N
unset /q Jump^# 17 48 bla on bri red No^goto Line9A^endiff^iff "%Store" eq "Y" then^# 17 48 bla on bri red Yes^goto Line9A^elseiff "%Store" eq "@59" then
set Line1=`You can store the whole path within an archive, so that is `^set Line2=`possible to restore the same path. Hit a key to continue...`
iff not isdir %@path[%Sourcepath] then^set Message=`Path %@upper[%@path[%Sourcepath]] does not exist, please correct path !`
gosub Messagebox^goto Line1C^endiff
iff not exist %Sourcepath then^set Message=`File %@upper[%@filename[%Sourcepath]] does not exist, please correct name !`
gosub Messagebox^goto Line1C^endiff
# 10 35 bla on bri red %Sourcepath
:Line2C
# 20 58 bri yel on bri red ` F1 = Help `^screen 11 48^inkey /c %%Sort^check %Sort
iff "%Sort" eq "@72" then^# 11 48 bla on bri red %@repeat[%@char[255],24]^goto Line1C^endiff
iff "%Sort" eq "@28" .or. "%Sort" eq "@80" then^unset Sort^ # 11 48 bla on bri red Not selected^goto Line3C^endiff
iff "%Sort" eq "A" then^set Sort=/+69^# 11 48 bla on bri red Attribute sort^goto Line6C^endiff
iff "%Sort" eq "C" then^set Sort=/+60^# 11 48 bla on bri red CRC sort^goto Line6C^endiff
iff "%Sort" eq "@59" then^set Line1=`For sorting on Attribute or CRC choose the valid option or `
set Line2=`press [ENTER] to skip these options. Hit a key to continue.`
gosub Help^goto Line2C^else^set Message=`Please answer with A(ttribute) or C(RC), %@upper[%Sort] is not allowed`
gosub Messagebox^goto Line2C^endiff
:Line3C
screen 12 48^inkey /c %%Sort^check %Sort
iff "%Sort" eq "@72" then^# 12 48 bla on bri red %@repeat[%@char[255],24]^# 11 48 bla on bri red %@repeat[%@char[255],24]^goto Line2C^endiff
iff "%Sort" eq "@28" .or. "%Sort" eq "@80" then^unset Sort^ # 12 48 bla on bri red Not selected^goto Line4C^endiff
iff "%Sort" eq "D" then^set Sort=/+41^# 12 48 bla on bri red Date sort^goto Line6C^endiff
iff "%Sort" eq "T" then^set Sort=/+51^# 12 48 bla on bri red Time sort^goto Line6C^endiff
iff "%Sort" eq "S" then^set Sort=/+14^# 12 48 bla on bri red Size sort^goto Line6C^endiff
iff "%Sort" eq "@59" then^set Line1=`For sorting on Date, Time or Size, choose a valid option or`
set Line2=`press [ENTER] to skip these options. Hit a key to continue.`
gosub Help^goto Line3C^else^set Message=`Please answer with D(ate),T(ime) or S(ize), %@upper[%Sort] is not allowed`^gosub Messagebox^goto Line3C^endiff
:Line4C
screen 13 48^inkey /c %%Sort^check %Sort
iff "%Sort" eq "@72" then^# 13 48 bla on bri red %@repeat[%@char[255],24]^# 12 48 bla on bri red %@repeat[%@char[255],24]
# 11 48 bla on bri red %@repeat[%@char[255],24]^goto Line3C^endiff
iff "%Sort" eq "@28" .or. "%Sort" eq "@80" then^unset Sort ^# 13 48 bla on bri red Not selected^goto Line5C^endiff
iff "%Sort" eq "E" then^set Sort=/+81^# 13 48 bla on bri red Extension sort^goto Line6C^endiff
iff "%Sort" eq "R" then^set Sort=/+36^# 13 48 bla on bri red Ratio sort^goto Line6C^endiff
iff "%Sort" eq "@59" then^set Line1=`For sorting on Extension or Ratio choose a valid option or `
set Line2=`press [ENTER] to skip these options. Hit a key to continue.`
gosub Help^goto Line4C^else^set Message=`Please answer with E(xtension) or R(atio), %@upper[%Sort] is not allowed`^gosub Messagebox^goto Line4C^endiff
:Line5C
screen 14 48^inkey /c %%Sort^check %Sort
iff "%Sort" eq "@72" then^# 14 48 bla on bri red %@repeat[%@char[255],24]^# 13 48 bla on bri red %@repeat[%@char[255],24]
# 12 48 bla on bri red %@repeat[%@char[255],24]^# 11 48 bla on bri red %@repeat[%@char[255],24]^goto Line4C^endiff
iff "%Sort" eq "@28" .or. "%Sort" eq "@80" then^set Message=`*** No sort-options selected, mainmenu will be reopend ***`^gosub Messagebox^goto Mainscreen^endiff
iff "%Sort" eq "F" then^set Sort=/+89^ # 14 48 bla on bri red Filename sort^goto Line6C^endiff
iff "%Sort" eq "P" then^set Sort=/+122^# 14 48 bla on bri red Path sort^goto Line6C^endiff
iff "%Sort" eq "@59" then^set Line1=`For sorting on Filename or Path choose the valid option or `
set Line2=`press [ENTER] to skip these options. Hit a key to continue.`
gosub Help^goto Line5C^else^set Message=`Please answer with F(ilenames) or P(ath), %@upper[%Sort] is not allowed`^gosub Messagebox^goto Line5C^endiff
:Line6C
# 15 48 bla on bri red N^screen 15 48^inkey /c %%Reverse^check %Reverse
iff "%Reverse" eq "@72" then^# 15 48 bla on bri red %@repeat[%@char[255],24]^# 14 48 bla on bri red %@repeat[%@char[255],24]
# 13 48 bla on bri red %@repeat[%@char[255],24]^# 12 48 bla on bri red %@repeat[%@char[255],24]^# 11 48 bla on bri red %@repeat[%@char[255],24]
iff "%Reverse" eq "@28" .or. "%Reverse" eq "N" then^unset Reverse^# 15 48 bla on bri red No reversed sortorder^goto Line7C^endiff
iff "%Reverse" eq "Y" then^set Reverse=/r^# 15 48 bla on bri red Sorting will be reversed^goto Line7C^endiff
iff "%Reverse" eq "@59" then^set Line1=`If you want all sorting to be done reversed you must choose`^set Line2=`YES. Answer NO will not reverse ! Hit a key to continue... `
gosub Help^goto Line6C^else^set Message=`Answer with Y(es) or N(o) , anything else is not allowed`^gosub Messagebox^goto Line6C^endiff
:Line7C
# 18 48 bla on bri red Y^screen 18 48^inkey /c %%Start^check %Start
iff "%Start" eq "@72" then^# 18 48 bla on bri red ` `^# 15 48 bla on bri red %@repeat[%@char[255],24]^ goto Line6C^endiff
iff "%Start" eq "N" then^# 18 48 bla on bri red No^goto Screen3^elseiff "%Start" eq "Q" then^goto Mainscreen^endiff
iff "%Start" eq "@59" then^set Line1=`YES or ALWAYS(no prompting) starts the program. QUIT to get`^set Line2=`back to mainscreen. NO to re-enter. Hit a key to continue..`
iff "%Remove" eq "@28" .or. "%Remove" eq "Y" then^set Remove=Y^# 14 45 bla on bri red Yes^goto Line6D^endiff
iff "%Remove" eq "N" then^set Message=`No menu-option has been chosen, mainmenu will be reopened !`^gosub Messagebox^goto Mainscreen^endiff
iff "%Remove" eq "@59" then^set Line1=`This option is to remove the path stored in an archive; not`
set Line2=`possible with absolute paths ! Hit a key to continue. `^gosub Help^goto Line5D^else^gosub Messagebox^goto Line5D^endiff
:Line6D
# 20 58 bla on bri red %@repeat[%@char[205],11]^screen 15 45^unset /q Psd^input /c /L17 /P %%Psd
iff "%Psd" eq "" .and. "%Garble" eq "Y" then^set Message=`You must type a password which will be added to %@upper[%@filename[%Sourcepath]]`
gosub Messagebox^goto Line6D^endiff
iff "%Psd" eq "" then^# 15 45 bla on bri red ` [No password] `^ else^# 15 45 bla on bri red ` [Password hidden] `^endiff
:Line7D
# 20 58 bri yel on bri red ` F1 = Help `^iff "%Change" eq "Y" .or. "%Garble" eq "Y" then^# 16 45 bla on bri red Not possible now^set Pause=N^goto Line8D
elseiff "%Remove" eq "Y" then^set Pause=N^# 16 45 bla on bri red Not possible now^goto Line8D^endiff
# 16 45 bla on bri red Y^screen 16 45^inkey /c %%Pause^check %Pause
# 19 11 bri yel on bri red %@repeat[%@char[255],61]^# 19 13 bri yel on bri red Full path for 4ARJ.CFG :
screen 19 38^input /c /E /L34 %%Cfgpath
iff %@removable[%@instr[0,2,%Cfgpath]] eq 1 then^set Message=`The configurationfile can only be created on a fixed disk`^gosub Messagebox^goto SubLine10F^endiff
iff %@filename[%Cfgpath] ne 4ARJ.CFG .or. not isdir %@path[%Cfgpath] then^set Message=`Syntax error : Filename must be 4ARJ.CFG or incorrect path`
gosub Messagebox^goto SubLine10F^endiff
:Line11F
# 22 58 bri yel on bri red ` F1 = Help `^# 20 57 bla on bri red Y^screen 20 57^inkey /c %%Main^check %Main
iff "%Main" eq "@72" then^unset Main Savecfg^# 19 13 bri yel on bri red `Save configuration in 4ARJ.CFG (Y/N): `
# 20 57 bla on bri red ` `^goto Line10F^endiff
iff "%Main" eq "@59" then ^ set Line1=`YES returns to the mainscreen, NO causes 4ARJ to go back to`
set Line2=`the beginning of this screen. Hit a key to continue. ` ^ gosub Help ^ goto Line11F ^ endiff
iff %@index[YN@28,%Main] eq -1 then^gosub Messagebox^goto Line11F^endiff^iff "%Main" eq "N" then^# 20 57 bla on bri red No^goto Screen5^endiff
iff "%Main" eq "Y" .or. "%Main" eq "@28" then^# 20 57 bla on bri red Yes^endiff^if "%Savecfg" eq "Y" gosub CFG_Create
iff "%Error" eq "Y" then^set Message=`%@upper[%@Path[%Cfgpath]] not matching your PATH, 4ARJ.CFG will be deleted`
alias D `# -1 0 %_fg on %_bg Do you want to FORMAT or only WIPE the targetdrive ? (F/W)^screen -1 59^inkey /k"FW" %%A^iff %A eq F then^Format %@instr[0,2,%Targetpath] /autotest /u^else^del /y /z %@instr[0,2,%Targetpath]\*.* >& nul^unset A^endiff`
cls %Origcolor^if exist %@path[%Archivepath]arj_sel del /q %@path[%Archivepath]arj_sel
iff %Attribute eq Y then^set CFG1=-a ^else^unset /q CFG1^endiff
iff %Method eq M then^set CFG2=-jm ^elseiff %Method eq N then^set CFG2=-m0^else^unset /q CFG2^endiff
iff %Arjdate eq Y then^set CFG3=-s ^else^unset /q CFG3^endiff
iff %Ansi eq Y then^set CFG4=-ja ^else^unset /q CFG4^endiff
iff %Indicator eq Y then^set CFG5=-i2 ^else^unset /q CFG5^endiff
iff %Workdir eq Y then^set CFG6=-w%temp ^else^unset /q CFG6^endiff
iff %Query eq Y then^set CFG7=-q ^else^unset /q CFG7^endiff
iff %Filespec eq Y then^set CFG8=-jl ^else^unset /q CFG8^endiff
iff %Sfx eq Y then^set Sfx=-je ^else^unset Sfx ^endiff
iff "%Psd" ne "" then^set Psd=-g%Psd ^else^unset /q Psd ^endiff
iff %Subdir eq Y then^set Subdir=-r ^else^unset Subdir ^endiff
iff %Volumes eq Y then^set Volumes=-vvasD ^else^unset Volumes^endiff
iff %Store eq N then^set Store=-e ^else^unset Store ^endiff
iff %Test eq Y then^set Test=-jt ^else^unset Test ^endiff
iff %Start eq A then^set Start=-y ^else^set Start=-y ^endiff
snd^echo Archive-file %@upper[%@filename[%Targetpath]] succesfully created/updated in %@upper[%@path[%Targetpath]]
echo Total time elapsed: %arjtime Minutes^echo Filesize of %@upper[%@filename[%Targetpath]] : %@filesize[%@path[%Targetpath]%@name[%Targetpath].*,bc] Bytes
unset /q arjtime^Pause^goto Mainscreen
:DescArj
iff "%Subdir" ne "" then^global /iq (if exist descript.ion set ION=Y)^else^if exist descript.ion set ION=Y^endiff
iff %ION eq Y then^unset ION^screen 1 0 Saving 4DOS-descriptions, one moment please . . .^screen 0 0^else^return^endiff
set handle=%@fileopen[arj_sel,read]^set _Sign=176^set _Col=0^setdos /s0:0
do forever
set _Val=%@fileread[%handle]
if "%_Col" eq "48" (set _Col=0^set _Sign=%@inc[%_Sign]^if %_Sign gt 178 set _Sign=176)
if "%_Val" eq "**EOF**" leave
set _Name=%@word[0,%_Val]
if "%@descript[%_Name]" ne "" echo %@filename[%_Name] %@descript[%_Name] >>! 4arj.ion
set _Col=%@inc[%_Col]^scrput 03 %_Col %_Bg on %_Fg %@char[%_Sign]
if exist %Startpath del /q %Startpath^Timer >! %_Boot:\arjtime.dat^set arjtime=%@substr[%@line[%_boot:\arjtime.dat,0],%@eval[%@len[%@line[%_boot:\arjtime.dat,0]]-8],5]
if exist %_Boot:\arjtime.dat del /q %_Boot:\arjtime.dat^iff errorlevel eq 0 then^snd
echo Archive-file %@upper[%@filename[%Sourcepath]] succesfully extracted in %@upper[%@path[%Extractpath]]
echo Total time elapsed: %arjtime Minutes^else^gosub Errors^endiff^unset /q arjtime^Pause^goto Mainscreen
:Descript
screen 1 0 Restoring 4DOS-descriptions, one moment please . . .
set handle=%@fileopen[%Startpath%,read]
do forever
if "%_Col" eq "51" (set _Col=0^set _Sign=%@inc[%_Sign]^if %_Sign gt 178 set _Sign=176)
set _Val=%@fileread[%handle]
if %_Val eq **EOF** leave
set _Name=%@word[0,%_Val]
set _Desc=%@trim[%@instr[%@len[%@word[0,%_Val]],%@len[%_Val],%_Val]]